﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace ARchGL.Platform.Core
{
    /// <summary>
    /// 自检 数据实体
    /// </summary>
    [Table("JN_" + nameof(SelfChecks))]
    public class SelfChecks : EntityCheckDateBase
    {
        /// <summary>
        /// 项目标识
        /// </summary>
        public Guid ProjectId { get; set; }
        /// <summary>
        /// 编号
        /// </summary>
        public long Number { get; set; }
        /// <summary>
        /// 状态（位枚举）：1已通知/待整改、2已整改/已通过、4已撤销
        /// </summary>
        public EnumSelfCheckStatus Status { get; set; }
        /// <summary>
        /// 检查内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 执行检查人标识集合
        /// </summary>
        public string CheckUsersArray { get; set; }
        /// <summary>
        /// 被通知人
        /// </summary>
        public string NotifyUsersArray { get; set; }
        /// <summary>
        /// 抄送人标识集合
        /// </summary>
        public string CCUsersArray { get; set; }
        /// <summary>
        /// 视图标识集合
        /// </summary>
        public string ProjectViewPortsArray { get; set; }
        //附件在 Attachments 表中通过 Id 关联
    }

    public abstract class EntityCheckDateBase : EntitySoftDeleteBase
    {
        /// <summary>
        /// 执行检查日期
        /// </summary>
        public DateTime CheckDate { get; set; }
    }
}
